package  
{
	import net.flashpunk.FP;
	import net.flashpunk.Entity;
	import net.flashpunk.graphics.Text;
	/**
	 * ...
	 * @author ...
	 */
	public class FPText extends Entity
	{
		private var counterLife:Number = 0;
		private var timeLife:Number = 0;
		
		public function FPText(x:Number, y:Number, text:String, timeLife:Number) 
		{
			graphic = new Text(text);
			this.x = x;
			this.y = y;
			this.timeLife = timeLife;
		}
		
		override public function update():void {
			//if(){
				counterLife += FP.elapsed;
				if (counterLife >= timeLife)
					world.remove(this);
			//}
		}
	}
}